package fe.bmsearch.gui.server;

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

import fe.bmsearch.gui.client.BMIndexedSearchService;
import fe.bmsearch.gui.client.PathToSelectorItem;
import fe.bmsearch.gui.client.PathTypesService;
import fe.bmsearch.gui.client.SearchResultItem;
import fe.documentquery.PathToSelector;

public class PathTypeServiceImpl extends RemoteServiceServlet
 implements PathTypesService {

	private static final long serialVersionUID = 1L;

	@Override
	public List<PathToSelectorItem> getPathToSelectorItems(String datatype) {
		List<PathToSelectorItem> paths=new ArrayList<PathToSelectorItem>();
		for(PathToSelector pts:PathToSelector.getAllPathsToSelector(datatype, true, true))
		{
			paths.add(new PathToSelectorItem(pts.toString(), pts.getUniqueString()));
		}
		return paths;
	}
}
